package com.iot.service;

import com.iot.mapper.DTwarn_recordMapper;
import com.iot.mapper.Twarn_recordMapper;
import com.iot.pojo.MTwarn_record;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class Twarn_recordServiceImpl implements Twarn_recordService {
    @Autowired
    private Twarn_recordMapper mapper;
    @Autowired
    private DTwarn_recordMapper dmapper;
    @Override
    public int getRecordCount(String sWhere) {
        return mapper.getRecordCount(sWhere);
    }
    @Override
    public int insert(MTwarn_record mTwarn_record) {
        return mapper.insert(mTwarn_record);
    }

    @Override
    public void update(MTwarn_record mTwarn_record) {
        mapper.update(mTwarn_record);
    }

    @Override
    public void deleteById(int id) {
        mapper.deleteById(id);
    }

    @Override
    public MTwarn_record single(Integer id) {
        return mapper.single(id);
    }

    @Override
    public List<MTwarn_record> fetch(String sWhere) {
        return mapper.fetch(sWhere);
    }

    @Override
    public List<Map<String, Object>> fetchByPage(Map<String, Object> map) {

        return dmapper.fetchByPage(map);
    }

    @Override
    public List<Map<String, Object>> getRecordByDeviceId(Map<String, Object> map) {

        return dmapper.getRecordByDeviceId(map);
    }


}
